[CI] update code.coverage job to report on all components and preview features#4002
[CI] update code.coverage job to report on all components and preview features#4002dbarker wants to merge 8 commits intoopen-telemetry:mainfrom
Conversation
…. update coverage runner.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4002 +/- ##
==========================================
- Coverage 90.32% 81.79% -8.52%
==========================================
Files 230 374 +144
Lines 7298 15766 +8468
==========================================
+ Hits 6591 12895 +6304
- Misses 707 2871 +2164 🚀 New features to boost your workflow:
|
|
Updated report shows the coverage of components not previously included (otlp exporters, resource detectors, ...): |
| --exclude "${SRC_DIR}/*/test/*" \ | ||
| --exclude "${SRC_DIR}/functional/*" \ | ||
| --exclude "${SRC_DIR}/semconv/*" \ | ||
| --exclude "${SRC_DIR}/examples/*" \ |
There was a problem hiding this comment.
Also exclude '/ext/http/server/' as before, the http server is test code, not a deliverable.
There was a problem hiding this comment.
Thanks for pointing that out. I can see ext/http/server headers are only used in tests and an example. They are installed for public use at the moment though. I'll move them to test_common in a separate PR.
| --exclude "${SRC_DIR}/functional/*" \ | ||
| --exclude "${SRC_DIR}/semconv/*" \ | ||
| --exclude "${SRC_DIR}/examples/*" \ | ||
| --ignore-errors gcov,mismatch,negative,unused \ |
There was a problem hiding this comment.
Which lcov errors is this suppressing in practice? mismatch and negative usually point at a real coverage-build bug.
There was a problem hiding this comment.
Thanks for pointing that out. I've updated the ignore args. Only unused was still needed after applying all the exclude args (prior errors where coming from still parsing the tests and examples).
The unused arg bypasses errors like:
geninfo: ERROR: 'exclude' pattern '/workspaces/opentelemetry-cpp/third_party/*' is unused.
(use "geninfo --ignore-errors unused ..." to bypass this error)
There was a problem hiding this comment.
Added -fprofile-update=atomic given this error.
geninfo: ERROR: Unexpected negative count '-3406' for /home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/common/spin_lock_mutex.h:117.
Perhaps you need to compile with '-fprofile-update=atomic
(use "geninfo --ignore-errors negative ..." to bypass this error)
Fixes # (issue)
Code coverage does not include all components and preview features. This PR expands coverage reporting.
Changes
test_common/cmake/all-options-abiv2-preview.cmakeCMake cache to cover all components and preview features with ABI v2.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes